<template>
  <div class="top">
    <div class="left">
      <span class="lbtn" @click="goHome">首页</span>
    </div>
    <div class="center">
      <div class="title">微信小程序集群监控平台</div>
    </div>
    <div class="right">
      <span class="rbtn">生成日志</span>
      <span class="time">当前时间：{{ time }}</span>
    </div>
  </div>
</template>

<script setup>
//点击首页按钮回到首页
import {useRouter} from 'vue-router';
import {ref} from 'vue';
//获取路由器对象
let $router = useRouter();

//当前时间
let time = ref("12:34:21")
//按钮的点击回调
const goHome = () => {
  $router.push('/')
}
</script>

<style scoped lang="scss">
.top {
  width: 100%;
  height: 40px;
  display: flex;

  .left {
    position: relative;
    width: 567px;
    height: 100%;
    background: url(@/assets/screen/dataScreen-header-left-bg.png) no-repeat;
    background-size: 100% 100%;

    .lbtn {
      width: 150px;
      height: 40px;
      float: right;
      background: url(@/assets/screen/dataScreen-header-btn-bg-l.png) no-repeat;
      background-size: 100% 100%;
      text-align: center;
      line-height: 40px;
      color: #29fcff;
      font-size: 20px;
    }
  }

  .center {
    position: relative;
    flex: 1;
    height: 100%;
    .title {
      width: 100%;
      height: 74px;
      background: url(@/assets/screen/dataScreen-header-center-bg.png) no-repeat;
      background-size: 100% 100%;
      text-align: center;
      line-height: 74px;
      color: #29fcff;
      font-size: 30px;
      letter-spacing: 4px;
    }
  }

  .right {
    position: relative;
    width: 567px;
    height: 100%;
    background: url(@/assets/screen/dataScreen-header-left-bg.png) no-repeat;
    background-size: 100% 100%;

    .rbtn {
      width: 150px;
      height: 40px;
      float: left;
      background: url(@/assets/screen/dataScreen-header-btn-bg-l.png) no-repeat;
      background-size: 100% 100%;
      text-align: center;
      line-height: 40px;
      color: #29fcff;
      font-size: 20px;
    }

    .time {
      text-align: center;
      line-height: 40px;
      margin-left: 100px;
      color: #29fcff;
      font-size: 20px;
    }


  }
}
</style>
